﻿<!doctype html>
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>博客首页</title>
<link href="/static/css/bootstrap.min2.css" type="text/css" rel="stylesheet">
<link href="/static/css/style2.css" type="text/css" rel="stylesheet">
<link type="text/css" href="/static/css/nprogress.css" rel="stylesheet">
<link href="/static/bs/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/static/js/html5shiv.min.js" type="text/javascript"></script>
<script src="/static/js/respond.min.js" type="text/javascript"></script>
<script src="/static/js/selectivizr-min.js" type="text/javascript"></script>
  <style>
    #user_icon{
        font-size:18px;
        margin-right:10px;
        vertical-align:-1px;
    }
    .dropdown{
        margin-left:40px;
    }
    .daohanglan{
        margin-top:30px;
        margin-bottom:30px;
    }
    .box{
    width: 380px;
    overflow : hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}
    .mryj{
        margin-top:15px;
        margin-left:-9px;
    }
    .logo_img{
        margin-top:-175px;
    }
    #x1_icon{
        color:#C0C0C0;
        opacity:0.7;
    }
  </style>
</head>

<body>
<div class="container">
<!--  左侧区域-->
    <div class="hidden-xs header">
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            {% if request.user.is_authenticated %}
          <div class="daohanglan">
            <a href="/{{request.user.username}}"><span id="user_icon" class="glyphicon glyphicon-user"></span>{{request.user.username}}</a>&nbsp;&nbsp;
            <div class="btn-group">
              <button type="button" class="btn btn-primary">个人设置</button>
              <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="caret"></span>
              </button>
              <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                <li><a href="#">修改密码</a></li>
                <li><a href="#">修改头像</a></li>
                <li><a href="/logout/">注销</a></li>
              </ul>
            </div>
          </div>
            {% else %}
          <div class="daohanglan">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <button  class="btn btn-danger"><a href="/login/">登录</a></button>&nbsp;&nbsp;
            <button  class="btn btn-danger"><a href="/register/">注册</a></button>
          </div>
            {% endif %}
          </ul>
        </div>
      <h1 class="logo"><a><img class="logo_img" src="/static/imgs/download.jpg" width="190px" height="124px"></a></h1>
      <ul class="nav hidden-xs-nav">
        <li class="active"><a href=""><span class="glyphicon glyphicon-home"></span>网站首页</a></li>
        <li><a href="#"><span class="glyphicon glyphicon-erase"></span>网站前端</a></li>
        <li><a href="#"><span class="glyphicon glyphicon-inbox"></span>后端技术</a></li>
        <li><a href="/myadmin/"><span class="glyphicon glyphicon-globe"></span>管理系统</a></li>
        <li><a href="#"><span class="glyphicon glyphicon-user"></span>关于我们</a></li>
        <li><a href="#"><span class="glyphicon glyphicon-tags"></span>友情链接</a></li>
      </ul>
      <div class="feeds">
        <a class="feed feed-xlweibo" href="https://weibo.com/" target="_blank"><i></i>新浪微博</a>
        <a class="feed feed-txweibo" href="https://t.qq.com/" target="_blank"><i></i>腾讯微博</a>
        <a class="feed feed-rss" href="#" target="_blank"><i></i>订阅本站</a>
        <a class="feed feed-weixin" href="#" target="_blank"><i></i>关注微信</a>
      </div>
      <div class="wall">
        <a href="#" target="_blank">读者墙</a> | <a href="#" target="_blank">标签云</a>
      </div>
    </div>
<!--中间内容-->
  <div class="content-wrap">
    <div class="content">
      <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!--banner-->
        <ol class="carousel-indicators">
          <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
          <li data-target="#carousel-example-generic" data-slide-to="1"></li>
          <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner" role="listbox">
          <div class="item active">
            <a href="content.html" target="_blank"><img src="/static/imgs/img1.jpg" alt="" /></a>
          </div>
          <div class="item">
            <a href="content.html" target="_blank"><img src="/static/imgs/img2.jpg" alt="" /></a>
          </div>
          <div class="item">
            <a href="content.html" target="_blank"><img src="/static/imgs/img3.jpg" alt="" /></a>
          </div>
        </div>
        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
      <div class="content-block hot-content hidden-xs">
        <h2 class="title"><strong>本周热门排行</strong></h2>
        <ul>
          <li class="large">
            <a href="#" target="_blank"><img src="/static/imgs/b01.jpg" ></a>
          </li>
          <li>
            <a href="#" target="_blank"><img src="/static/imgs/b02.jpg" ></a>
          </li>
          <li>
            <a href="#" target="_blank"><img src="/static/imgs/b03.jpg"></a>
          </li>
          <li>
            <a href="#" target="_blank"><img src="/static/imgs/b04.jpg"></a>
          </li>
          <li>
            <a href="#" target="_blank"><img src="/static/imgs/b05.jpg"></a>
          </li>
        </ul>
      </div>
      <div class="content-block new-content">
        <h2 class="title"><strong>最新文章</strong></h2>
        {% for article in article_list  %}
        <div class="row">
          <div class="news-list">
            <div class="news-img col-md-4">
              <img  src="media/{{article.user.avatar}}" class="img_size" alt="头像">
            </div>
            <div class="news-info col-md-8">
              <dl>
                <dt> <a href="/{{article.user}}/articles/{{article.nid}}" target="_blank" >{{article.title}}</a></dt>
                <dd>
                  <span class="name"><span class="glyphicon glyphicon-user" id="x1_icon"></span><a href="/{{article.user}}">{{article.user}}</a></span>
                  <span class="time"><span class="glyphicon glyphicon-time" id="x2_icon"></span>时间:{{article.create_time|date:"Y-m-d H:i"}}</span>
                </dd>
                <dd class="text"><p class="box">{{article.desc}}</p></dd>
              </dl>
              <div class="news_bot col-sm-7">
                <span class="tags visible-lg visible-md">
                  <a>本站</a> <a>大博客</a>
                </span>
                <span class="look"> 共 <strong>{{article.comment_count}}</strong> 条评论，获得<strong> {{article.up_count}} </strong> 个赞
                </span>
              </div>
            </div>
          </div>
        </div>
        <hr>
        {% endfor %}

        <div class="quotes" style="margin-top:15px">
          <span class="disabled">首页</span>
          <span class="disabled">上一页</span>
          <span class="current">1</span>
          <a href="">2</a><a href="">下一页</a>
          <a href="">尾页</a>
        </div>
      </div>
    </div>
  </div>

  <!--右侧区域-->
  <aside class="sidebar visible-lg"><!--右侧>992px显示-->
    <div class="sentence"> <strong>每日一句</strong>
      <h2>{{ cur|date:"Y年m月d日"}} {{today}}</h2>
      <p>你是我人生中唯一的主角，我却只能是你故事中的一晃而过得路人甲。</p>
      <img class="mryj" src="/static/imgs/ad.jpg" width="296" height="240">
    </div>
    <div id="search" class="sidebar-block search" role="search">
      <h2 class="title"><strong>搜索</strong></h2>
      <form class="navbar-form" action="search.php" method="post">
        <div class="input-group">
          <input type="text" class="form-control" size="35" placeholder="请输入关键字">
          <span class="input-group-btn">
          <button class="btn btn-default btn-search" type="submit">搜索</button>
          </span> </div>
      </form>
    </div>
    <div class="sidebar-block recommend">
      <h2 class="title"><strong>热门推荐</strong></h2>
      <ul>
        <li>
          <a target="_blank" href="">
            <span class="thumb"><img src="" alt=""></span>
            <span class="text">最新文章</span>
            <span class="text-muted">点赞(数量)</span>
          </a>
        </li>
      </ul>
    </div>
    <div class="sidebar-block comment">
      <h2 class="title"><strong>最新评论</strong></h2>
      <ul>
        <li data-toggle="tooltip" data-placement="top" title="站长的评论">
          <a target="_blank" href="">
            <span class="face"><img src="" alt=""></span>
            <span class="text"><strong>谁</strong> (什么时间) 说：<br />内容</span>
          </a>
        </li>
      </ul>
    </div>
  </aside>
</div>
</body>

</html>
